package com.by.controller;

import com.by.bean.QueryComplaint;
import com.by.common.core.bean.PageBean;
import com.by.common.core.bean.ResultBean;
import com.by.common.core.controller.BaseController;
import com.by.service.OrderComplaintService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "投诉管理")
@RequestMapping("/complaint")
@Slf4j
public class OrderComplaintController extends BaseController {

    @Autowired
    OrderComplaintService complaintService;

    @ApiOperation("查询投诉列表")
    @PostMapping("/com")
    public ResultBean<PageBean> queryComplaint(@RequestBody QueryComplaint complaint) {
        PageBean bean=complaintService.query(complaint);
        return success("查询投诉列表", bean);
    }
}
